library(readxl)
<-read_excel("avocado.csv..xlsx") Caso_Aguacate_xls
🥑REGRESION LINEAL MULTIPLE
1) 🥑FORMAS DE HALLAR LAS VARIABLES MULTIPLES(X1,X2)
<-lm(`Total Volume (NUMERO TOTAL DE AGUACATES VENDIDOS)` ~ `Small Bags (BOLSAS PEQUEÑAS)`+`Large Bags (BOLSAS GRANDES)` ,data=Caso_Aguacate_xls)
modelo2
modelo2
Call:
lm(formula = `Total Volume (NUMERO TOTAL DE AGUACATES VENDIDOS)` ~
`Small Bags (BOLSAS PEQUEÑAS)` + `Large Bags (BOLSAS GRANDES)`,
data = Caso_Aguacate_xls)
Coefficients:
(Intercept) `Small Bags (BOLSAS PEQUEÑAS)`
3.468e+04 4.305e+00
`Large Bags (BOLSAS GRANDES)`
5.821e-01
RESUMEN
summary(modelo2)
Call:
lm(formula = `Total Volume (NUMERO TOTAL DE AGUACATES VENDIDOS)` ~
`Small Bags (BOLSAS PEQUEÑAS)` + `Large Bags (BOLSAS GRANDES)`,
data = Caso_Aguacate_xls)
Residuals:
Min 1Q Median 3Q Max
-12673058 -78023 -36561 -3746 25816806
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.468e+04 6.665e+03 5.204 1.97e-07 ***
`Small Bags (BOLSAS PEQUEÑAS)` 4.305e+00 2.016e-02 213.573 < 2e-16 ***
`Large Bags (BOLSAS GRANDES)` 5.821e-01 6.165e-02 9.442 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 874700 on 18246 degrees of freedom
Multiple R-squared: 0.9359, Adjusted R-squared: 0.9359
F-statistic: 1.331e+05 on 2 and 18246 DF, p-value: < 2.2e-16
2) 🥑FORMAS DE HALLAR LAS VARIABLES MULTIPLES(X1,X2,X3)
<-lm(`Total Volume (NUMERO TOTAL DE AGUACATES VENDIDOS)` ~ `Small Bags (BOLSAS PEQUEÑAS)`+`Large Bags (BOLSAS GRANDES)`+`XLarge Bags (BOLSAS EXTRAGRANDES)` ,data=Caso_Aguacate_xls) modelo3
RESUMEN
summary(modelo3)
Call:
lm(formula = `Total Volume (NUMERO TOTAL DE AGUACATES VENDIDOS)` ~
`Small Bags (BOLSAS PEQUEÑAS)` + `Large Bags (BOLSAS GRANDES)` +
`XLarge Bags (BOLSAS EXTRAGRANDES)`, data = Caso_Aguacate_xls)
Residuals:
Min 1Q Median 3Q Max
-11413880 -79822 -30489 4596 25190934
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.782e+04 6.509e+03 4.274 1.93e-05 ***
`Small Bags (BOLSAS PEQUEÑAS)` 4.691e+00 2.348e-02 199.840 < 2e-16 ***
`Large Bags (BOLSAS GRANDES)` 4.577e-01 6.031e-02 7.589 3.38e-14 ***
`XLarge Bags (BOLSAS EXTRAGRANDES)` -1.828e+01 6.060e-01 -30.171 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 853700 on 18245 degrees of freedom
Multiple R-squared: 0.9389, Adjusted R-squared: 0.9389
F-statistic: 9.347e+04 on 3 and 18245 DF, p-value: < 2.2e-16